package com.cy.dda.dao.mapper.statistics;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.cy.dda.model.domain.statistics.StatisticsRepayRecord;
import com.cy.dda.model.dto.statistics.MaintainStatisticsDTO;
import com.cy.dda.model.query.statistics.StatisticsRepayRecordCountQuery;
import com.cy.dda.model.query.statistics.StatisticsRepayRecordQuery;
import com.cy.dda.model.vo.statistics.StatisticsRepayRecordCountVO;
import com.cy.dda.model.vo.statistics.StatisticsRepayRecordVO;

import tk.mybatis.mapper.common.BaseMapper;

/**
 * StatisticsRepayRecord
 *
 * @author: tanyilin
 * @create: 2018年11月2日 下午4:07:26
 */
@Mapper
public interface StatisticsRepayRecordMapper extends BaseMapper<StatisticsRepayRecord> {

	/**
	 * 维护统计回款记录
	 * 
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	MaintainStatisticsDTO statisticsRepayRecord(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
	
	/**
	 * 查询本日、本周、本月、以及全部的回款数量统计
	 * 
	 * @param toDayStartTime
	 * @param thisWeekStartTime
	 * @param thisMonthStartTime
	 * @return
	 */
	StatisticsRepayRecordCountVO selectStatisticsRepayRecordCountVO(StatisticsRepayRecordCountQuery query);
	
	/**
	 * 回款数据统计
	 * 
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	List<StatisticsRepayRecordVO> selectStatisticsRepayRecordVO(StatisticsRepayRecordQuery query);
}
